<%@ page language="java" pageEncoding="UTF-8"%>
<%@ include file="/WEB-INF/core/common/top.jsp"%>

<script>
$(document).ready(function(){
	$.formValidator.initConfig({formid:"form0",tidymode:true,onerror:function(msg) {showMessage(msg);}});
	$("#allocateRoom").formValidator().inputValidator({min:1,onerror:"输入框必须输入内容！"});

});

function doConfirm(name){
	var val=document.forms[0].allocateRoom.value;
	//alert(val);
	if(val==null || val==''){
		showMessage('标记为 *&nbsp;&nbsp;的项必须输入内容！');
		return false;
	}
	if(confirm("确定的执行 '"+name+"' 操作？")){
		this.document.forms[0].submit();
		return true;
	}else{
		return false;
	}

}

</script>

<body style="overflow-x: hidden; overflow-y: auto;">
<div id="mytest3"></div>
<table width="98%" border="0" align="center" cellpadding="0"cellspacing="0">
	<%@include file="/WEB-INF/core/common/message.jsp"%>
	<tr>
		<td>
		<table border="0" align="center" cellpadding="0" cellspacing="0">
			<td width="8" height="27"><img src="${ctx}/core/images/button_05.gif" width="8" height="27" /></td>
			<td width="99%" align="left" background="${ctx}/core/images/button_06.gif" class="bluecu">&nbsp;
				<img src="${ctx}/core/images/icon_04.gif" />&nbsp;新订单操作</td>
			<td width="8"><img src="${ctx}/core/images/button_07.gif"
				width="8" height="27" /></td>
		</table>
		</td>
	</tr>

	<tr>
		<td colspan="3" class="biaoge">
		<table width="100%" border="0" cellspacing="0" cellpadding="0">
			<form id="form0" name="mainForm" method="post"	action="${ctx}/platformManage/orderManage.action">
			<input name="act" type="hidden" value="editSubmit" />
			<input name="operateId" type="hidden" value="<s:property value='operateId'/>"/>
			<input name="order.id" type="hidden" value="<s:property value='order.id'/>"/>

		</table>


		</td>
	</tr>

	<tr>
		<td colspan="3" class="biaoge" valign="top">
		<table width="100%" border="0" cellpadding="0" cellspacing="1"	bordercolor="#FFFFFF">
			<tr align="left">
				<td width="10%" height="25" bgcolor="#DDE4EA" nowrap align="center">订单ID</td>
				<td nowrap width="40%" bgcolor="#DDE4EA" align="left">&nbsp;
					<s:property value="order.id" />					
				</td>

				<td width="10%" nowrap="nowrap" bgcolor="#DDE4EA" align="center">联系电话</td>
				<td width="40%" bgcolor="#DDE4EA" align="left">&nbsp;
					<s:property value="order.userPhone" />
				</td>
			</tr>
			
			
			<tr align="left">
				<td width="10%" height="25" bgcolor="#DDE4EA" nowrap align="center">订单内容</td>
				<td nowrap width="40%" bgcolor="#DDE4EA" align="left">&nbsp;
					<s:property value="order.orderName" />					
				</td>

				<td width="10%" nowrap="nowrap" bgcolor="#DDE4EA" align="center">房间数量</td>
				<td width="40%" bgcolor="#DDE4EA" align="left">&nbsp;
					<s:property value="order.units" />
				</td>
			</tr>
			
			<tr align="left">
				<td width="10%" height="25" bgcolor="#DDE4EA" nowrap align="center">使用日期</td>
				<td nowrap width="40%" bgcolor="#DDE4EA" align="left">&nbsp;
					<s:date name="order.startTime" format="yyyy-MM-dd"  />			
				</td>

				<td width="10%" nowrap="nowrap" bgcolor="#DDE4EA" align="center">使用时段</td>
				<td width="40%" bgcolor="#DDE4EA" align="left">&nbsp;
					<exts:select name="order.timeSegment" pageState="view" value="%{order.timeSegment}"  code="TIME_SEGMENT" ></exts:select>
				</td>
			</tr>
			
			<tr align="left">
				<td width="10%" height="25" bgcolor="#DDE4EA" nowrap align="center">下单时间</td>
				<td nowrap width="40%" bgcolor="#DDE4EA" align="left">&nbsp;
					<s:date name="order.recordTime" format="yyyy-MM-dd HH:mm:ss"  />			
				</td>

				<td width="10%" nowrap="nowrap" bgcolor="#DDE4EA" align="center">订单总价</td>
				<td width="40%" bgcolor="#DDE4EA" align="left">&nbsp;
					<s:property value="order.price" /> 元
				</td>
			</tr>
			
			<tr align="left">
				<s:if test="operateId==1">
					<td width="10%" height="25" bgcolor="#DDE4EA" nowrap align="center"><font color="red">分配房号 *</font></td>
				</s:if>
				<s:elseif test="operateId==2">
					<td width="10%" height="25" bgcolor="#DDE4EA" nowrap align="center"><font color="red">拒绝理由 *</font></td>
				</s:elseif>
				<td nowrap width="40%" colspan="6" bgcolor="#DDE4EA" align="left">&nbsp;
					<exts:textfield id="allocateRoom" name="order.allocateRoom" value="%{order.allocateRoom}" pageState="%{pageState}"  class="textbox_css" style="width:96%"/>
									
				</td>

				
			</tr>
			
			
	    	
			
			<tr>
				<td height="10" colspan="4" background="../core/images/line5.gif">&nbsp;</td>
			</tr>
			<tr>
				<td height="25" colspan="4" align="center">
				<s:if test="operateId==1">
					<input id="saveButton" type="button"  onclick="doConfirm('分配');" class="btn" value="分配"/>
				</s:if>
				<s:elseif test="operateId==2">
					<input id="saveButton" type="button" onclick="doConfirm('拒绝');" class="btn" value="拒绝"/>
				</s:elseif>				
					
				    <input id="returnButton" type="button" class="btn"	value="<s:text name='button.return'/>" onclick="location='platformManage/orderManage.action?act=query';"/>
				</td>
			</tr>
		</table>
		</td>
	</tr>

	</form>
</table>
</body>
